#ifndef _LIBGETTEXT_H
#define _LIBGETTEXT_H 1

# undef  gettext
# define gettext(Msgid) ((const char *) (Msgid))
# undef  dgettext
# define dgettext(Domainname, Msgid) ((const char *) (Msgid))
# undef  dcgettext
# define dcgettext(Domainname, Msgid, Category) ((const char *) (Msgid))
# undef  ngettext
# define ngettext(Msgid1, Msgid2, N) \
    ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2))
# undef  dngettext
# define dngettext(Domainname, Msgid1, Msgid2, N) \
    ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2))
# undef  dcngettext
# define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \
    ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2))
# undef  textdomain
# define textdomain(Domainname) ((const char *) (Domainname))
# undef  bindtextdomain
# define bindtextdomain(Domainname, Dirname) ((const char *) (Dirname))
# undef  bind_textdomain_codeset
# define bind_textdomain_codeset(Domainname, Codeset) ((const char *) (Codeset))

#endif

/* A pseudo function call that serves as a marker for the automated
   extraction of messages, but does not call gettext().  The run-time
   translation is done at a different place in the code.
   The argument, String, should be a literal string.  Concatenated strings
   and other string expressions won't work.
   The macro's expansion is not parenthesized, so that it is suitable as
   initializer for static 'char[]' or 'const char[]' variables.  */
#define gettext_noop(String) String

/* short cut macros */

/* I use dgettext so that the right domain will be looked at when
   Aspell is used as a library */
#define _(String) dgettext ("aspell", String)
#define N_(String) gettext_noop (String)

/* use gt_ when there is the possibility that str will be the empty
   string.  gettext in this case is not guaranteed to return an
   empty string */
static inline const char * gt_(const char * str) {
  return str[0] == '\0' ? str : _(str);
}

extern "C" void aspell_gettext_init();

